Design by Contract for Python
نویسنده
چکیده
The idea of design by contract (DBC), realized in the statically typed object-oriented programming language Eiffel, can be viewed as a systematic approach to specifying and implementing object-oriented software systems. We believe that a statically typed programming language is not suitable in the analysis and design phase of a prototyping-oriented software life cycle. For this purpose, dynamically typed interpreted programming languages are better suited. Unfortunately, dynamically typed programming languages usually do not support the concept of DBC. Therefore we integrated DBC into the programming language Python by using a metaprogramming approach, i.e., without changing the language or the run-time system. We adopted the DBC concept by adding mechanisms for dynamic type checking for method parameters and instance variables. The proposed combination of a more formal approach with a slim programming language provides a good basis for elicitation and documentation tasks in the analysis and design phase, especially in cases of a prototypingoriented software development approach. Although the approach presented provides basic tool support for the analysis and design phase, further tool support, especially for browsing assertions, is desirable.
منابع مشابه
Tool Support for Design by Contract
Numerous experience reports indicate that prototyping is a serious and successful development strategy. We believe that it is not sufficient to provide graphical notations for object-oriented analysis, but that the notation of contracts in conjunction with prototyping, i.e., building executable models, is the proper technique for mastering complexity and gaining insights into a problem domain. ...
متن کاملDlib-ml: A Machine Learning Toolkit
There are many excellent toolkits which provide support for developing machine learning software in Python, R, Matlab, and similar environments. Dlib-ml is an open source library, targeted at both engineers and research scientists, which aims to provide a similarly rich environment for developing machine learning software in the C++ language. Towards this end, dlib-ml contains an extensible lin...
متن کاملProgramming language evolution
Programming languages are the way developers communicate with computers—just like natural languages let us communicate with one another. In both cases multiple languages have evolved. However, the programming language ecosystem changes at a much higher rate compared to natural languages. In fact, programming languages need to constantly evolve in response to user needs, hardware advances and re...
متن کاملOptimum Design of Liquified Natural Gas Bi-lobe Tanks using Finite Element, Genetic Algorithm and Neural Network
A comprehensive set of ten artificial neural networks is developed to suggest optimal dimensions of type ‘C’ Bi-lobe tanks used in the shipping of liquefied natural gas. Multi-objective optimization technique considering the maximum capacity and minimum cost of vessels are implemented for determining optimum vessel dimensions. Generated populations from a genet...
متن کاملDesign and Implementation of an Embedded Python Run-Time System
This paper presents the design and implementation of a complete embedded Python run-time system for the ARM Cortex-M3 microcontroller. The Owl embedded Python run-time system introduces several key innovations, including a toolchain that is capable of producing relocatable memory images that can be utilized directly by the run-time system and a novel foreign function interface that enables the ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1997